<?php
if (isset($_GET)) {
    include_once 'module/controls.php';
    include_once 'model/board/process.php';
    include_once 'model/category/process.php';
    $c = new controls();
    $board = new boards();
    $category = new categories();
    $fillAll = $category->FillAll();
    $fillOne = $board->FillOne($_GET); 
    ?>
    <div id="content">
        <div class="content_block">
            <h2 class="jquery_tab_title"><?php echo $phrase["manager_boards"] ?></h2>
            <form method="post" action="<?= $url["home"] ?>/menu/boardprocess/t/1">
                <p>
                    <?php echo $c->get_textHidden("id", $fillOne["board_id"]) ?>
                    <?php echo $c->get_label($phrase["board_name"]) ?>
                    <?php echo $c->get_text("boardname", $fillOne["board_name"]) ?>
                    <span id="tick_username" class="tick"></span>
                    <span id="cross_username" class="cross"></span>
                </p>
                <p>
                    <?php echo $c->get_label($phrase["cate_name"]) ?>
                    <select name="cate_name" id="cate_name" >
                        <?php
                        while ($rows = mysql_fetch_array($fillAll)) {
                            ?>
                            <option value="<?= $rows["category_id"] ?>" <?php if($rows["category_id"] == $fillOne["category_id"]){ ?>selected='selected'<?php } ?>><?= $rows["category_name"] ?></option>
                        <?php } ?>
                    </select>
                </p>
                <p>
                    <?php echo $c->get_button("update", $phrase["update"]) ?>
                </p>
            </form>
        </div>
    </div>
<?php } ?>
<script type="text/javascript">
    $(document).ready(function(){
        $('.button').click(board_check);
    });
</script>